Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Nov 3, 2025

Link issues

fixes #7056

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Enable configurable wrapping behavior in the Transfer component by adding parameters for item wrapping, text wrapping, and item width, along with corresponding CSS and sample UI controls

New Features:

  • Add IsWrapItem parameter to the Transfer component to enable item wrapping
  • Add IsWrapItemText parameter to the Transfer component to enable text wrapping within items
  • Expose ItemWidth parameter to customize the width of transfer items

Enhancements:

  • Implement wrap-item and wrap-item-text CSS classes for flex layout and text overflow handling
  • Update the sample Transfers page to include UI controls for toggling wrap modes and testing long text overflow

Copilot AI review requested due to automatic review settings November 3, 2025 07:25
@bb-auto bb-auto bot added the enhancement New feature or request label Nov 3, 2025
@bb-auto bb-auto bot added this to the 10.0.0 milestone Nov 3, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 3, 2025

Reviewer's Guide

This PR introduces customizable wrapping behavior and item width support to the Transfer component by adding new parameters, updating the component’s CSS classes, and exposing these controls in the demo page.

Class diagram for updated Transfer component parameters

classDiagram
class Transfer {
  +bool IsWrapItem = true
  +bool IsWrapItemText
  +string? ItemWidth
}
Loading

File-Level Changes

Change Details Files
Add wrapping and width parameters to Transfer
  • Introduce IsWrapItemText parameter for text wrapping
  • Set default value for IsWrapItem to true
  • Add ItemWidth parameter to control item width
  • Update ClassString to include wrap-item and wrap-item-text classes
src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs
Extend SCSS to support wrap-item and wrap-item-text modes
  • Define flex row wrapping and item width under .wrap-item
  • Enable normal white-space and overflow handling under .wrap-item-text
  • Restore default ellipsis behavior for unchecked mode
  • Adjust panel flex-direction and remove fixed width from .transfer-panel-item
src/BootstrapBlazor/Components/Transfer/Transfer.razor.scss
Update Transfer demo to expose wrapping controls
  • Add switches and input for IsWrapItem, IsWrapItemText and ItemWidth
  • Bind demo variables _isWrapItem, _isWrapItemText, _itemWidth to Transfer
  • Insert a long test item to validate overflow and wrapping behavior
src/BootstrapBlazor.Server/Components/Samples/Transfers.razor
src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs
Minor markup and formatting tweaks
  • Reformat input and button tags in TransferPanel and Transfer to align attributes
  • Adjust form-check min-height overriding
src/BootstrapBlazor/Components/Transfer/TransferPanel.razor
src/BootstrapBlazor/Components/Transfer/Transfer.razor

Assessment against linked issues

Issue Objective Addressed Explanation
#7056 Add an IsWrapItemText parameter to the Transfer component to control whether item text is wrapped.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

sourcery-ai[bot]
sourcery-ai bot previously approved these changes Nov 3, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src/BootstrapBlazor.Server/Components/Samples/Transfers.razor:9-18` </location>
<code_context>
+    <section ignore class="row form-inline g-3">
</code_context>

<issue_to_address>
**nitpick:** Usage of 'ignore' attribute on section may be unnecessary.

If 'ignore' is not needed for a specific framework, please remove it to keep the markup clear.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Transfer component to improve layout flexibility and text overflow handling. The changes introduce new configuration options for item wrapping and text overflow behavior, along with adjusting default styling to be more flexible.

Key changes:

  • Added new IsWrapItemText parameter to control text wrapping within items
  • Changed IsWrapItem default from false to true (breaking change)
  • Restructured CSS to separate item layout wrapping from text wrapping, with improved default overflow handling

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/BootstrapBlazor/Components/Transfer/TransferPanel.razor Reformatted input and Checkbox elements for better readability (whitespace only)
src/BootstrapBlazor/Components/Transfer/Transfer.razor.scss Refactored CSS to separate item wrapping from text wrapping, added default ellipsis overflow handling
src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs Added IsWrapItemText parameter, changed IsWrapItem default to true, updated documentation
src/BootstrapBlazor/Components/Transfer/Transfer.razor Reformatted Button elements for better readability (whitespace only)
src/BootstrapBlazor.Server/Locales/zh-CN.json Updated Chinese description for normal Transfer usage
src/BootstrapBlazor.Server/Locales/en-US.json Updated English description for normal Transfer usage
src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs Added test variables and modified test data to include overflow test case
src/BootstrapBlazor.Server/Components/Samples/Transfers.razor Added interactive controls to test new wrapping parameters
src/BootstrapBlazor.Server/Components/Routes.razor Added conditional routing logic for .NET 10 compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8d5d690) to head (e93e518).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7057   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          745       745           
  Lines        32532     32534    +2     
  Branches      4510      4510           
=========================================
+ Hits         32532     32534    +2     
Flag Coverage Δ
BB 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ArgoZhang ArgoZhang merged commit eaa2a93 into main Nov 3, 2025
4 of 5 checks passed
@ArgoZhang ArgoZhang deleted the refactor-router branch November 3, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Transfer): add IsWrapItemText parameter

2 participants